<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
	background-color: #E4E4E4;
}
</style>
</head>

<body>
<div align="center">
<p>&nbsp;</p>
<?php
include("conn.php");
if(isset($_POST['Addpub']) and !(isset($_POST['pubid']))){
$s="insert into publishers values('', '$_POST[lname]', '$_POST[fname]', '$_POST[dob]', '$_POST[dobap]', '$_POST[sex]', '$_POST[addr]','$_POST[cell]','$_POST[pubgrpnum]', '$_POST[pubov]', '$_POST[state]')";
if(mysql_query($s,$conn))
{
print("<font color=#003366><strong>Publisher Record Was Successfully Saved!! <a href=publisher.php>Add Another Publisher</a></strong></font>");
}else{
print("<font color=#FF0000><strong>Something Went Wrong Record Was not Saved!! <a href=publisher.php>Add Another Publisher</a></strong></font>");	
}
}else{
$s="update publishers set lname='$_POST[lname]', fname='$_POST[fname]', dob='$_POST[dob]', dobap='$_POST[dobap]', sex='$_POST[sex]', addr='$_POST[addr]', cellnum='$_POST[cell]', pubgrpnum='$_POST[pubgrpnum]', grpoverseerstatus='$_POST[pubov]', state='$_POST[state]' where pubid='$_POST[pubid]'";	
if(mysql_query($s,$conn))
{
print("<font color=#003366><strong>Publisher Record Was Successfully Modified!!</strong></font>");
}else{
print("<font color=#FF0000><strong>Something Went Wrong Record Was not Modified!!</strong></font>");	
}
}
?></div>
</body>
</html>